export class DateTime {
    private _year: number;
    private _month: number;
    private _day: number;
    private _hour: number;
    private _minute: number;
    private _second: number;

    before(datatime: DateTime): boolean{
        return this.year < datatime.year
        || this.year == datatime.year && this.month < datatime.month
        || this.year == datatime.year && this.month == datatime.minute && this.day < datatime.day
        || this.year == datatime.year && this.month == datatime.minute && this.day == datatime.day
            && this.hour < datatime.hour
        || this.year == datatime.year && this.month == datatime.minute && this.day == datatime.day
            && this.hour == datatime.hour && this.minute < datatime.minute
        || this.year == datatime.year && this.month == datatime.minute && this.day == datatime.day
            && this.hour == datatime.hour && this.minute == datatime.minute && this.second < datatime.second;
    }

    get year(): number {
        return this._year;
    }

    set year(value: number) {
        this._year = value;
    }

    get month(): number {
        return this._month;
    }

    set month(value: number) {
        this._month = value;
    }

    get day(): number {
        return this._day;
    }

    set day(value: number) {
        this._day = value;
    }

    get hour(): number {
        return this._hour;
    }

    set hour(value: number) {
        this._hour = value;
    }

    get minute(): number {
        return this._minute;
    }

    set minute(value: number) {
        this._minute = value;
    }

    get second(): number {
        return this._second;
    }

    set second(value: number) {
        this._second = value;
    }


}